﻿@model StudyManagement.ViewModels.StudentDetailsViewModel
@{
    ViewBag.Title = "学生详情";
    var photoSrc = Model.Student.PhotoPath == null ? "~/images/nophoto.jpg" : $"~/uploads/images/{Model.Student.PhotoPath}";
}

<div class="row mt-3">
    <div class="col-2">
        <div class="card">
            <div class="card-header">
                <h1>头像</h1>
            </div>
            <div class="card-body">
                <img src="@photoSrc" alt="Alternate Text" asp-append-version="true"/>
            </div>
        </div>
    </div>
    <div class="col-10">
        <div class="card">
            <div class="card-header">
                <h1>@ViewBag.Title</h1>
            </div>
            <ul class="list-group">
                <li class="list-group-item">Id: @Model.Student.Id</li>
                <li class="list-group-item">姓名: @Model.Student.Name</li>
                <li class="list-group-item">班级: @Model.Student.ClassName</li>
                <li class="list-group-item">邮箱: @Model.Student.Email</li>
            </ul>
        </div>
    </div>
</div>